package com.clear.honghefinance.common.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.util.AntPathMatcher;

/**
 * 路径匹配config
 */
@ConditionalOnProperty(prefix = "sys", name = "enable-my-security", havingValue = "true")   // bean的注入条件
@Configuration
public class PathMatcherConfig {

    /**
     * 配置AntPathMatcher Bean
     *
     * @return AntPathMatcher实例，用于路径匹配
     */
    @Bean
    public AntPathMatcher antPathMatcher() {
        return new AntPathMatcher();
    }
}
